package compiler.ast;

import java.io.PrintStream;

import compiler.tac.BasicBlock;
import compiler.tac.ThreeAddressCode;

public class Number implements Factor {
	int value;
	
	public Number(int val) {
		this.value = val;
	}
	
	public int getValue()
	{
		return value;
	}

	public void printDotFormat(PrintStream out, String node) {
		out.println(node+" [label=\""+value+"\"];");
	}
	
	public String toThreeAddressCode(ThreeAddressCode tac, BasicBlock prev)
	{
		return "#"+this.value;	
	}
}

